<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of CateForm
 *
 * @author thanhdx
 */
class CateForm extends CFormModel{
    //put your code here
    public $name;
    public $pos;
    public function rules() {
        return array(
            array('name','required'),
            array('pos','numerical','integerOnly'=>true),
        );
    }
    
    public function save(){
        $cate = Categories::model();
        $cate->setAttributes(array('name'=>$this->name,'pos'=>$this->pos));
    }
}

?>
